﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Resume.aspx.cs" Inherits="WebApplication.Resume" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=userInfo.NickName %>的接稿页-画师帮</title>
    <link href="/Content/Css/layui.css" rel="stylesheet" />
    <link href="/Content/Css/common.css" rel="stylesheet" />
    <link href="/Content/Css/resume.css" rel="stylesheet" />
    <link href="/Content/Css/iconfont.css" rel="stylesheet" />
    <script src="/Content/Scripts/layui.js"></script>
    <script src="/Content/Scripts/jquery-3.6.0.js"></script>
    <script src="/Content/Scripts/bootstrap.min.js"></script>
    <script src="/Content/Scripts/bootstrap.bundle.min.js"></script>
    <script src="/Content/Scripts/header.js"></script>
    <script src="/Content/Scripts/utils.js"></script>
</head>
<body>
    <div class="resume">
        <div class="layui-row" style="width: 1200px;">
            <div class="layui-col-md10 layui-col-md-offset1 layui-col-sm10 layui-col-sm-offset1">
                <div class="resume-card">
                    <div slot="header" class="header">
                        <div>
                            <a href="/User/Arts.aspx?id=<%=userInfo.UserID %>" target="_blank" class=""><span class="avatar" style="width: 80px; height: 80px;">
                                <img
                                    src="<%=userInfo.AvatarUrl.Substring(1) %>"" /></span></a>
                        </div>
                        <div class="nickname">
                            <%=userInfo.NickName %>
                            <i class="iconfont" style="font-size: 16px;"></i>
                            <div class="lmid" style="margin-left: 5px;">
                                <span class="prefix">联盟ID</span>
                                <span class="id"><%=userInfo.UserID %></span>
                            </div>

                        </div>
                        <div class="tags">
                                <% 
                                    if (!string.IsNullOrEmpty(resumeInfo.IdentityTag))
                                    {
                                %>
                                <span class="el-tag el-tag--mini el-tag--light"><%=resumeInfo.IdentityTag %></span>
                                <%} %>

                                <% 
                                    string tag = resumeInfo.Tag;
                                    List<string> tags = new List<string>();
                                    if (tag != null)
                                    {
                                        tags = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(tag);
                                    }
                                    if (tags.Count > 0)
                                    {
                                        tags.Remove("@");
                                    }

                                    foreach (string t in tags)
                                    {
                                %>
                                <span class="el-tag el-tag--info el-tag--mini el-tag--light"><%=t %></span>
                                <%} %>
                            </div>
                        <div class="nav">
                            <a href="/" class="el-link active" target="_blank">画师帮官网
                            </a>
                            <div class="el-divider el-divider--vertical">
                            </div>
                            <a href="/User/Arts.aspx?id=<%=userInfo.UserID %>" target="_blank" class="el-link">个人主页
                            </a>
                        </div>

                        <% 
                            if (resumeInfo.OwnerID == Convert.ToInt32(Session["UID"]))
                            {

                            %>
                        <a href="Setting/Resume.aspx" class="el-button btn-edit el-button--primary is-circle">
                            <i class="iconfont icon-edit" style="font-size:18px;"></i>
                        </a>
                        <%} %>
                    </div>

                    <div class="body">
                        <div class="resume-info-item">
                            <div class="title">
                                简介
                            </div>
                            <div class="content"><%=string.IsNullOrEmpty(resumeInfo.Intro)?"未填写":resumeInfo.Intro %></div>
                        </div>
                        <div class="resume-info-item">
                            <div class="title">
                                接稿经验
                            </div>
                            <div class="content"><%=string.IsNullOrEmpty(resumeInfo.Experience)?"未填写":resumeInfo.Experience %></div>
                        </div>
                        <div class="resume-info-item">
                            <div class="title">
                                档期
                            </div>
                            <div class="content"><%=string.IsNullOrEmpty(resumeInfo.Schedule)?"未填写":resumeInfo.Schedule %></div>
                        </div>
                        <div class="resume-info-item">
                            <div class="title">
                                报价
                            </div>
                            <div class="content"><%=string.IsNullOrEmpty(resumeInfo.Quote)?"未填写":resumeInfo.Quote %></div>
                        </div>
                        <div class="resume-info-item">
                            <div class="title">
                                联系方式
                            </div>
                            <div class="content"><%=string.IsNullOrEmpty(resumeInfo.Contact)?"未填写":resumeInfo.Contact %></div>
                        </div>
                        <div class="resume-info-item">
                            <div class="title">
                                精选作品
                            </div>
                            <div class="content" style="white-space:initial;">
                                <div class="layui-row layui-col-space10">

                                    <% if (resumeInfo.Artworks.Count > 0)
                                        { %>
                                        <% foreach (Models.Artworks artwork in resumeInfo.Artworks)
                                            { %>
                                    <div class="layui-col-md3">
                                        <div class="art-item">
                                            <a style="display: block;" href="/Art/Detail.aspx?id=<%=artwork.ArtworkID %>" target="_blank">
                                                <div class="cover-wrapper" style="background-image: url(<%=artwork.Cover.Substring(1)%>);">
                                                </div>
                                            </a>
                                        </div>
                                    </div>
                                    <%} %>
                                    <%}
                                        else
                                        { %>
                                    这个家伙太懒，没有上传任何作品
                                    <%} %>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
